package gu.sql2java;

import com.google.common.base.Strings;

class PageQueryOffsetFetchImpl implements IPageQueryWrap {

	public PageQueryOffsetFetchImpl() {
	}

	@Override
	public String wrap(String sql, int startRow, int numRows) {
        if(!Strings.isNullOrEmpty(sql) && numRows > 0){
			return sql + " OFFSET " + (startRow -1)  + " ROWS FETCH NEXT " + numRows + " ROWS ONLY";
    	}
		return null;
	}

}
